**********************************************************************************************************************************************
**********************************************************************************************************************************************
*Replication code for "Determining the willingness to link climate and trade policy"  
*by M. Lumkowsky, E. Carlton, D. Victor & A. Dannenberg (2023)
**********************************************************************************************************************************************
**********************************************************************************************************************************************
*Settings***********************************************************************

clear
version 15.1
discard
global MY_PATH_IN	"" // Enter path where data set is saved. 
global LOG_FILE 	"" // Enter path to save log-file. 
global LOG  ${LOG_FILE}MAIN_PAPER_Analysis.log
capture log close
log using "${LOG}", text replace
set more off

********************************************************************************
*Load data set******************************************************************

use "${MY_PATH_IN}01_MAIN_PAPER_DATA.dta" 

********************************************************************************
*Table 1************************************************************************

tab IPCC

sum age 
sum age if IPCC == 0
sum age if IPCC == 1

sum g6 
sum g6 if IPCC == 0
sum g6 if IPCC == 1

sum g7 
sum g7 if IPCC == 0
sum g7 if IPCC == 1

tab g1
tab g1 if IPCC == 0
tab g1 if IPCC == 1

tab g5_2
tab g5_2 if IPCC == 0 
tab g5_2 if IPCC == 1

tab g4
tab g4 if IPCC == 0 
tab g4 if IPCC == 1

tab OECD_CAT
tab OECD_CAT if IPCC == 0 
tab OECD_CAT if IPCC == 1

********************************************************************************
*Figure 1***********************************************************************

*Left panel/Orange (dot) markers

tab c4_2_DUMMY if OECD_CAT == 1 
tab c4_2_DUMMY if OECD_CAT == 2
tab c4_2_DUMMY if OECD_CAT == 3
tab c4_2_DUMMY if OECD_CAT == 4
tab c4_2_DUMMY if OECD_CAT == 5
tab c4_2_DUMMY if OECD_CAT == 6

*Left panel/Blue (diamond) markers
 
tab c4_1_DUMMY if OECD_CAT == 1
tab c4_1_DUMMY if OECD_CAT == 2
tab c4_1_DUMMY if OECD_CAT == 3
tab c4_1_DUMMY if OECD_CAT == 4
tab c4_1_DUMMY if OECD_CAT == 5
tab c4_1_DUMMY if OECD_CAT == 6

*Right panel/Orange (dot) markers

tab c5_2_DUMMY if OECD_CAT == 1
tab c5_2_DUMMY if OECD_CAT == 2
tab c5_2_DUMMY if OECD_CAT == 3
tab c5_2_DUMMY if OECD_CAT == 4
tab c5_2_DUMMY if OECD_CAT == 5
tab c5_2_DUMMY if OECD_CAT == 6

*Right panel/Blue (diamond) markers
 
tab c5_1_DUMMY if OECD_CAT == 1
tab c5_1_DUMMY if OECD_CAT == 2
tab c5_1_DUMMY if OECD_CAT == 3
tab c5_1_DUMMY if OECD_CAT == 4
tab c5_1_DUMMY if OECD_CAT == 5
tab c5_1_DUMMY if OECD_CAT == 6

********************************************************************************
*In text (Section 4.1)**********************************************************

tab c4_2_DUMMY if OECD == 1
tab c4_2_DUMMY if OECD == 0
tab c4_2_DUMMY OECD, chi2

tab c4_1_DUMMY if OECD == 1
tab c4_1_DUMMY if OECD == 0
tab c4_1_DUMMY OECD, chi2

tab c5_2_DUMMY if OECD == 1
tab c5_2_DUMMY if OECD == 0
tab c5_2_DUMMY OECD, chi2

tab c5_1_DUMMY if OECD == 1
tab c5_1_DUMMY if OECD == 0
tab c5_1_DUMMY OECD, chi2

********************************************************************************
*Table 3************************************************************************

*Table 3/Column 1
probit c4_2_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 3/Column 2
probit c4_2_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 3/Column 3
probit c4_2_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 3/Column 4
probit c4_2_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 3/Column 5
probit c4_2_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 3/Column 6
probit c4_2_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std  c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

********************************************************************************
*Table 4************************************************************************

*Table 4/Column 1
probit c4_1_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 4/Column 2
probit c4_1_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 4/Column 3
probit c4_1_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 4/Column 4
probit c4_1_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 4/Column 5
probit c4_1_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 4/Column 6
probit c4_1_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std  c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

********************************************************************************
*Table 5************************************************************************

*Table 5/Column 1
probit c5_2_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 5/Column 2
probit c5_2_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 5/Column 3
probit c5_2_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 5/Column 4
probit c5_2_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 5/Column 5
probit c5_2_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 5/Column 6
probit c5_2_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std  c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

********************************************************************************
*Table 6************************************************************************

*Table 6/Column 1
probit c5_1_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 2
probit c5_1_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 3
probit c5_1_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 4
probit c5_1_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 5
probit c5_1_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 6
probit c5_1_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std  c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

********************************************************************************
*Figure 2***********************************************************************

tab c3_DUMMY if OECD_CAT == 1 
tab c3_DUMMY if OECD_CAT == 2
tab c3_DUMMY if OECD_CAT == 3
tab c3_DUMMY if OECD_CAT == 4
tab c3_DUMMY if OECD_CAT == 5
tab c3_DUMMY if OECD_CAT == 6 

*In text (Section 4.2)**********************************************************

tab c3_DUMMY OECD_CAT if (OECD_CAT == 1 | OECD_CAT == 2), chi2
tab c3_DUMMY OECD_CAT if (OECD_CAT == 1 | OECD_CAT == 3), chi2
tab c3_DUMMY OECD_CAT if (OECD_CAT == 1 | OECD_CAT == 4), chi2
tab c3_DUMMY OECD_CAT if (OECD_CAT == 1 | OECD_CAT == 5), chi2
tab c3_DUMMY OECD_CAT if (OECD_CAT == 1 | OECD_CAT == 6), chi2

********************************************************************************
*Table 7************************************************************************

*Table 6/Column 1
probit c3_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 2
probit c3_DUMMY c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 3
probit c3_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 4
probit c3_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 5
probit c3_DUMMY i.NEU_OECD i.NEU_NOECD c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

*Table 6/Column 6
probit c3_DUMMY i.NEU_OECD i.NEU_NOECD c.GDP_PPP_PC_2019_std  c.Trade_Share_2019_std c.sum_rents_std c.CO2_PC_2019_std i.d1_10_DUMMY i.d2_10_DUMMY c.Quality_Institutions_std c.POLITY_std i.IPCC i.g5_DUMMY_NATIONAL i.g4_DUMMY_ECON i.g4_DUMMY_LAW i.g4_DUMMY_OTHER c.g6_std i.male, vce(robust)
margins, dydx(*) atmeans post

********************************************************************************
log close
********************************************************************************
********************************************************************************


























